<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * @title 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * @title 测试
     * @description
     * @param name:id type:string require:1  other: default: desc:id
     * @return res:结果
     * @author
     * @url /api/index/index
     * @method POST
     */
    public function index()
    {
//        echo 1;die;
        $a = [1,2,3,4,5,6,7,8,9];
        $b = "str";
        $c = array_map(function ($row) use ($b) {
//            return $row;
            return [$row,$b];
        },$a);
        $this->success('请求成功',$c);
    }
}
